package com.lk.pojo;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import com.google.gson.annotations.Expose;

@Entity
@Table(name="t_usergroup")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class UserGroup {

	@Expose
	private String id;
	@Expose
	private String groupName;
	@Expose
	private String createTime;
	private List<User> userList;
	
	@Id
	@GenericGenerator(name="usergroupid",strategy="uuid")
	@GeneratedValue(generator="usergroupid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	
	@OneToMany(mappedBy="userGroup")
	public List<User> getUserList() {
		return userList;
	}
	public void setUserList(List<User> userList) {
		this.userList = userList;
	}
	
	
	
}
